package com.vcredit.bird.enumtype;

public enum MobileCodeEnum {
	INIT(1,"初始化"), LOGIN(2, "登陆"), LoginWithSMS(3, "登录(附带短信随机码)"), CheckSMS(4, "验证验证码"), SendSMSAndVercode(5, "动态短信验证码和图片验证码"),CheckQueryCode(6,"验证查询码")
	,SendSMS(7, "发送动态短信验证码"),Query(8,"查询账单");
	private Integer code;
	private String desc;

	private MobileCodeEnum(Integer code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public Integer getCode() {
		return code;
	}

	public String getName() {
		return desc;
	}
	
	public static MobileCodeEnum getEnumByCode(Integer value){
		MobileCodeEnum ret = null;
		for(MobileCodeEnum obj:MobileCodeEnum.values()){
			if(obj.getCode()==value){
				ret = obj;
				break;
			}
		}
		return ret;
	}
}
